.row
	.col-sm-7
		h3.no-top-margin Project activity
		ul.list-unstyled
			li(ng-repeat="event in events")
				strong: time(ng-bind="event.createdFormatted")
				span :&nbsp;
				span(ng-bind="event.object_name")
				span(ng-if="event.object_name.length > 0")  -&nbsp;
				span {{ event.description }}
		button.btn.btn-default.btn-s(ng-click="refreshEvents($lastEvents=false)") Show all events

	.col-sm-5(style="border-left: 1px solid #EEE;")
		h4.no-top-margin Task history
		ul.nav.nav-pills.nav-stacked.task-history-list
			li(ng-repeat="task in tasks"): a(ng-click="openTask(task)" href="#")
				h4.center-block(ng-if="task.tpl_alias.length > 0") {{ task.tpl_alias }}
				h4.center-block(ng-if="task.tpl_alias.length == 0") No alias
				span(ng-class="{ 'text-muted': task.status == 'waiting', 'text-info': task.status == 'running', 'text-danger': task.status == 'error', 'text-success': task.status == 'success' }")
					span(ng-if="task.playbook.length == 0") {{ task.tpl_playbook }}
					span(ng-if="task.playbook.length > 0") {{ task.playbook }}
				span.pull-right(ng-if="task.status == 'waiting'") {{ task.createdFormatted }}
				span.pull-right(ng-if="task.status != 'waiting'") {{ task.startFormatted }}

				br
				span &nbsp;
				span.pull-right {{ task.duration }} minutes
				br
				span &nbsp;
				span.pull-right(ng-if="task.user_name") by {{ task.user_name }}
		button.btn.btn-default.btn-s(ng-click="reload($lastTasks=false)") Show all tasks
